$(function() {
    $('.comment').on('click', function(e) {
        var target = $(this)
        var toId=target.data('tid')
        console.log(toId)
        var commentId=target.data('cid')
        $('<input>').attr({
            type: 'hidden',
            name: 'comment[tid]',
            value:toId
        }).appendTo('#commentform');
          $('<input>').attr({
            type: 'hidden',
            name: 'comment[cid]',
            value:commentId
        }).appendTo('#commentform');
    })
})
